Warning fixes from Conrad.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 18 Sep 2013 05:17:49 +0000 (05:17 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 18 Sep 2013 05:17:49 +0000 (05:17 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4619 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/cet/ansi_x3_4_1968.h
gpsbabel/cet/iso_8859_1.h
gpsbabel/cet_util.cc
gpsbabel/csv_util.cc
gpsbabel/garmin_fs.cc
gpsbabel/gbfile.cc
gpsbabel/gbser_posix.cc
gpsbabel/jeeps/gpsmath.cc

index 78574c0f0aad2591af0878c41bfd6eff03b29e2c..0ad2b0b9692ba74eea20c1416cb30f43ee6a8ba5 100644 (file)
@@ -41,7 +41,7 @@ const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968] = {0};
 
 #define cet_ucs4_to_ansi_x3_4_1968_ct 1
 
-const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_4_1968_ct] = {{0}};
+const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_4_1968_ct] = {{0, 0}};
 
 // #define cet_ucs4_to_ansi_x3_4_1968_extra_ct 200
 
index 70b71664c503f103565f3fc1c130c4e5c91690ed..82a61855d0bfbb419ff84e0237b13b7ef676e830 100644 (file)
@@ -41,7 +41,7 @@ const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1] = {0};
 
 #define cet_ucs4_to_iso_8859_1_ct 1
 
-const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_ct] = {{0}};
+const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_ct] = {{0, 0}};
 
 /*
 #define cet_ucs4_to_iso_8859_1_extra_ct 0
index 2ea3d52d9c928c8523beb5ca8a5c2bfcc736988b..f6026af720058731beb09a7bf68ac83ebd7ce636 100644 (file)
@@ -386,15 +386,16 @@ const char* cet_cs_utf8_alias[] = {
 cet_cs_vec_t cet_cs_vec_utf8 = {
   CET_CHARSET_UTF8,
   cet_cs_utf8_alias,
-  NULL,        /* dec */
-  NULL,        /* enc */
-  NULL,        /* link */
+  NULL,
+  NULL,
+  NULL,
+  0,
   0,
+  NULL,
+  0,
+  NULL,
   0,
-  NULL,        /* extra */
-  0,   /* extras */
   NULL,
-  0
 };
 
 void
@@ -1044,6 +1045,7 @@ cet_convert_route_hdr(const route_head* route)
 static void
 cet_convert_route_tlr(const route_head* route)
 {
+  (void)route;
 }
 
 /* %%% cet_convert_strings (public) %%%
@@ -1057,6 +1059,8 @@ cet_convert_strings(const cet_cs_vec_t* source, const cet_cs_vec_t* target, cons
 {
   char* cs_name_from, *cs_name_to;
 
+  (void)format;
+
   converter = NULL;
 
   if ((source == NULL) || (source == &cet_cs_vec_utf8)) {
index a09c577a007960710a6be57f883d451eba690b83..62da6164fbc300e857e9b34835e2bfa8be2360a2 100644 (file)
@@ -936,7 +936,7 @@ static
 int
 writehms(char* buff, size_t bufsize, const char* format, time_t t, int gmt)
 {
-  static struct tm no_time = {0};
+  static struct tm no_time = tm();
   static struct tm* stmp = &no_time;
 
   if (gmt) {
@@ -2195,6 +2195,7 @@ next:
 static void
 xcsv_noop(const route_head* wp)
 {
+  (void)wp;
   /* no-op */
 }
 
index 3717cdfb667858431ebce54a32a7e74ee9883898..59fae1780268e4c121ecb2c75bf7d44e9d26f81e 100644 (file)
@@ -463,6 +463,8 @@ garmin_fs_garmin_before_write(const waypoint* wpt, GPS_PWay way, const int proto
 {
   garmin_fs_t* gmsd = GMSD_FIND(wpt);
 
+  (void)protoid; // unused for now.
+
   if (gmsd == NULL) {
     return;
   }
index 12fcd924c76547a62388dcce1b2f7d32e6aac4e1..58925f6432970b00463a1eb1a38c074277c810ed 100644 (file)
@@ -359,6 +359,8 @@ stdapi_error(gbfile* self)
 static gbfile*
 memapi_open(gbfile* self, const char* mode)
 {
+  (void)mode;
+
   self->mempos = 0;
   self->memsz = 0;
   self->handle.mem = NULL;
@@ -445,6 +447,7 @@ memapi_write(const void* buf, const gbsize_t size, const gbsize_t members, gbfil
 static int
 memapi_flush(gbfile* self)
 {
+  (void)self;
   return 0;
 }
 
@@ -475,12 +478,14 @@ memapi_ungetc(const int c, gbfile* self)
 static void
 memapi_clearerr(gbfile* self)
 {
+  (void)self;
   return;
 }
 
 static int
 memapi_error(gbfile* self)
 {
+  (void)self;
   return 0;
 }
 
index aaeb0ca5753ec7cd7db0113d974bc9518e66e763..ed9fcd6b7f43c08efccc048859797379f6a53d32 100644 (file)
@@ -325,11 +325,15 @@ int gbser__fill_buffer(void* handle, unsigned want, unsigned* ms)
       time_left = *ms - elapsed(&tv);
 
       if (FD_ISSET(h->fd, &rec)) {
+#if 0
+        // See below comment.
+
         unsigned vmin = 0, vtime = 0;
         if (time_left >= 100) {
           vmin  = want - h->inbuf_used;
           vtime = (unsigned) time_left / 100;
         }
+#endif
         // The commented out call to set_rx_timeout here is totally
         // legal by POSIX standards but does result in a flurry of
         // of tcsetattrs that slightly tweak VMIN/VTIME while there
index ecb34c74df99f11bb742b81d6846efafc8e891ad..efb09c881fac48f9a6078ac421adc50d7fee6f84 100644 (file)
@@ -766,7 +766,6 @@ void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double* E,
                                    double E0, double N0, double a, double b)
 {
   double p2;
-  double po2;
   double a2;
   double b2;
   double e2;
@@ -778,21 +777,25 @@ void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double* E,
   double c2;
   double c3;
   double om0;
+#if 0
   double A0;
   double A1;
   double A2;
   double A3;
+#endif
   double j;
   double te4;
   double phi0s2;
   double phi0s4;
   double phi0s6;
   double lat;
+#if 0
   double x;
   double E1;
   double E2;
   double E3;
   double E4;
+#endif
 
   double phis;
   double phic;
@@ -820,7 +823,6 @@ void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double* E,
 
 
   p2 = (double)GPS_PI * (double)2.;
-  po2 = (double)GPS_PI / (double)2.;
 
   a2 = a*a;
   b2 = b*b;
@@ -842,6 +844,8 @@ void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double* E,
   AM0 = a * (lat-phi0s2+phi0s4-phi0s6);
 
   om0 = (double)1.0 - e2;
+#if 0
+  // None of this is used -- is there a reason to keep it?
   x = pow(om0,(double)0.5);
   E1 = ((double)1.0 - x) / ((double)1.0 + x);
   E2 = E1*E1;
@@ -851,6 +855,7 @@ void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double* E,
   A1 = (double)21.*E2/(double)16.-(double)55.*E4/(double)32.;
   A2 = (double)151.*E3/(double)96.;
   A3 = (double)1097.*E4/(double)512.;
+#endif
 
 
   dlam = lambda - M0;
@@ -2515,7 +2520,7 @@ void GPS_Math_UTM_EN_to_LatLon(int ReferenceEllipsoid,
   double eccPrimeSquared;
   double e1;
   double N1, T1, C1, R1, D, M;
-  double mu, phi1, phi1Rad;
+  double mu, phi1Rad;
   double x, y;
 
   a = GPS_Ellipse[ReferenceEllipsoid].a;
@@ -2534,7 +2539,6 @@ void GPS_Math_UTM_EN_to_LatLon(int ReferenceEllipsoid,
   phi1Rad = mu+ (3*e1/2-27*e1*e1*e1/32)*sin(2*mu) +
             (21*e1*e1/16-55*e1*e1*e1*e1/32)*sin(4*mu) +
             (151*e1*e1*e1/96)*sin(6*mu);
-  phi1 = GPS_Math_Rad_To_Deg(phi1Rad);
 
   N1 = a/sqrt(1-eccSquared*sin(phi1Rad)*sin(phi1Rad));
   T1 = tan(phi1Rad)*tan(phi1Rad);